package com.tech.zhidengxian.controller;

import com.tech.zhidengxian.model.dto.MessageDTO;
import com.tech.zhidengxian.model.dto.OrderDTO;
import com.tech.zhidengxian.model.dto.page.MyPage;
import com.tech.zhidengxian.model.dto.request.MessageRequest;
import com.tech.zhidengxian.model.dto.result.ReturnResult;
import com.tech.zhidengxian.model.dto.result.ReturnResultUtils;
import com.tech.zhidengxian.service.api.OrderService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Ljh
 * @date 2023/5/13 11:40
 * @description 订单模块
 **/
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    private OrderService orderService;
    @RequestMapping("/createNewOrder")
    public ReturnResult<OrderDTO> createNewOrder(@RequestBody OrderDTO orderDTO){
        return ReturnResultUtils.returnSuccess(orderService.createNewOrder(orderDTO));
    }
}
